Configuring Import: Alarms CSV Commands

Use the Import File: Alarms CSV command to import comma-separated values (.csv) files containing alarms data for gas Nodes (not supported for liquid Nodes) into your CygNet Measurement system. Results of the import can be viewed via the Alarms control or Raw Data control (Alarms data view), depending on the data source. Prior to executing the import command, you can configure and edit the alarms .csv file to prepare it for successful importation into FMS, and customize it using an .idf file. The file to use for the import is defined by the value of the Import file directory parameter.

CygNet Measurement provides a sample CSV file for alarms data (SampleAlarmsImport.csv) that you can adjust and use to create CSV files for new imports. The sample .csv file is located in the CygNet\Services\FMS\ImportSamples folder on your host server.

In addition, you can optionally define details about how items in your alarms .csv file are imported into FMS and how they will appear in the imported file, as well as what values are required for successful import. To do this, column and data source settings can be customized using an import definition file (.idf). A sample of this file for alarms data (CxFmsImportCsvAlarms.idf) is also provided by CygNet Measurement. The sample .idf files are located in the CygNet\Services\FMS\ImportSamples folder on your host server.

Note: An import definition file (IDF) allows you to customize how data is imported into your system via CSV files. See Using an Import Definition File for more information.

See FMS Commands and Import: Alarms CSV for more information about this command.

See Scheduling FMS Command Tasks in the MSS for more information about scheduling commands.

See FMS ActiveX Controls and CxHmiFms for more information about using commands via FMS ActiveX controls on CygNet Studio or CygNet Vision screens.

See CxFms for more information about scripting commands.

Command Definition Properties

The following command definition properties apply to Alarms CSV File Import commands.

Property Description

Command type

For system commands, this property will be read-only and will display the selected command type.

See FMS Commands for more information about command types.

Priority

Select a processing queue Priority for the command from the drop-down menu.

Options from least to greatest priority are as follows.

  • Low level
  • Medium level
  • High level
  • User initiated transaction
  • Admin initiated transaction

Default value is Low level processing queue priority.

Logging

Select a Logging level for the command results from the drop-down menu.

Options are as follows.

  • Low — displays errors
  • Medium — displays errors and warnings
  • High — displays errors, warnings, and status

Default value is Low level logging when scheduling a command in the MSS.

Default value is High level logging when creating or running an ad-hoc command in FMS Explorer.

Command Parameters

The following command parameters apply to Import: Alarms CSV commands, when creating or editing commands in FMS. See Alarms Import CSV Files for more information about setting up your alarms .csv file for import.

Parameter Value

Import file directory

Enter the directory location of the Alarms import file.

Type in the value or click ... to access the Browse for Folder dialog box, and browse to the directory location.

Note: The directory specified is relative to the computer hosting the FMS.

This parameter is required.

Import file mask

If specified, applies a filter to only import files meeting the defined file mask.

Type a file mask value to determine which type of files to import. A value of '*' will import all file types, whereas a value of '*.csv' will only import CSV files.

Default file mask value is "*" (multiple character wildcard).

This parameter is optional.

Processed files retention (days)

If specified, the files that have been processed will be deleted after the specified number of days. If not specified, processed files will never be deleted.

Type the number of days.

This parameter is optional.

Unit set

If specified, select a unit set in which to view the data.

Options appear in the drop-down menu, which is populated by the unit sets defined in the service. See Configuring Unit Set Definitions for more information.

This parameter is optional.

Notes:

If the unit set is specified with the command parameter AND in the .csv file, the value specified in the .csv file prevails, and overrides the command setting.

If no unit set is specified with the command parameter, units may be specified in the .csv file for included alarm items using units.

If no unit set is specified with the command parameter, and no units are specified in the .csv file, the default unit set (as configured in your system) will be used.

Comments

If specified, the comments will be part of the audit record for the file import. Type comments regarding the import.

This parameter is optional.

Configuring Alarms Import CSV Files

Note: Prior to importing an alarms .csv file, the following conditions must be met for each Node for which you are importing data.

Preparing the CSV Import File

Include the DateTime column in the import file to apply imported alarm data to the record for the corresponding date and time.

Use the following procedure to prepare an alarms import .csv file for import into FMS. Sample .csv files are provided for your use in the CygNet\Services\FMS\ImportSamples folder on your host server.

To Configure and Edit an Alarms Import CSV File

Once generated, you can edit the alarms import .csv file as follows, prior to importing it into FMS.

  1. Open a .csv file for your alarms import.
  2. Edit default column entries, using your .csv editor. All default alarms import .csv columns are noted in the table below.
  3. Insert additional columns into your file, as desired. Available alarms import .csv columns are described or referenced below.
  4. Edit any alarms items desired (e.g. units, description, etc.), in preparation for importing the file to FMS.
  5. Save and Close the .csv file when you are done.
  6. Optionally prepare an IDF to customize your import. See Using an Import Definition File for more information.

Alarms Import CSV Columns

The columns included in the sample alarms .csv file provide an example of which values may exist in the import file. You can copy and edit the .csv file to prepare it for import, and further customize the import using an .idf (sample file also provided) to define how data is imported into your system, including defining custom column names and specifying values required for successful import. The .csv and .idf files in conjunction work to import data into your system in the format most suitable for your usage.

Default Alarms Import CSV Columns

The following table lists the columns reflected in the .csv sample file by default, for which values may exist in the alarms import file. The list is not complete; it is provided for reference. See FMS Alarms Data Items for additional data item options.

Column* Data Item Description
Device Device - The device name
DateTime AlarmDateTime - The date/time for which to import and update the alarms record

Units

eFMS_ALARM_ENTRY_UNITS - Units associated with the alarm

State

eFMS_ALARM_STATE - The alarm state, for example:

  • eFMS_ALARM_STATE_CLEAR_ALL - Clear: all
  • eFMS_ALARM_STATE_CLEAR - Clear: no level specified
  • eFMS_ALARM_STATE_CLEAR_LOW_ALARM - Clear: low alarm
  • eFMS_ALARM_STATE_CLEAR_LOW_WARNING - Clear: low warning
  • eFMS_ALARM_STATE_CLEAR_HIGH_ALARM - Clear: high alarm
  • eFMS_ALARM_STATE_CLEAR_HIGH_WARNING - Clear: high warning
  • eFMS_ALARM_STATE_CLEAR_RATE_CHANGE - Clear: rate change
  • eFMS_ALARM_STATE_SET - Set: no level specified
  • eFMS_ALARM_STATE_SET_LOW_ALARM - Set: low alarm
  • eFMS_ALARM_STATE_SET_LOW_WARNING - Set: low warning
  • eFMS_ALARM_STATE_SET_HIGH_ALARM - Set: high alarm
  • eFMS_ALARM_STATE_SET_HIGH_WARNING - Set: high warning
  • eFMS_ALARM_STATE_SET_RATE_CHANGE - Set: rate change

See FMS Alarms Data Items for more information about alarm state enumeration values.

AlarmType

eFMS_ALARM_TYPE - The alarm type, for example:

  • eFMS_ALARM_TYPE_DEVICE - Device
  • eFMS_ALARM_TYPE_DP - Differential pressure
  • eFMS_ALARM_TYPE_SP - Static pressure
  • eFMS_ALARM_TYPE_FLOW_TEMP - Flow temperature
  • eFMS_ALARM_TYPE_FLOW_RATE - Flow rate
  • eFMS_ALARM_TYPE_FLOW_VOLUME - Flow volume
  • eFMS_ALARM_TYPE_BATTERY - Battery
  • eFMS_ALARM_TYPE_BACK_FLOW - Back flow
  • eFMS_ALARM_TYPE_CUTOFF - Cutoff
  • eFMS_ALARM_TYPE_CALC_ERROR - Calculation error
  • eFMS_ALARM_TYPE_NO_FLOW - No flow

See FMS Alarms Data Items for more information about alarm type enumeration values.

ValueType

eFMS_ALARM_VALUE_TYPE - Type of alarm value, for example:

  • eFMS_VALUE_TYPE_NUMERIC - Numeric
  • eFMS_VALUE_TYPE_STRING - String
  • eFMS_VALUE_TYPE_NONE - None

Value

eFMS_ALARM_VALUE - Alarm value

AdditionalInfo

eFMS_ALARM_ADDITIONAL_INFO - Additional alarm information

SequenceInfo

eFMS_ALARM_SEQUENCE_INFO - Alarm sequencing information

*Column names are configurable to appear as user-provided values; default sample file values are listed.

Back to top

Additional Alarms Import CSV Columns

Additional column headers can also be included in the alarms import .csv file, as appropriate for your usage. Columns can be included for any supported FMS Alarms data items for which you have data in your system. See FMS Alarms Data Items for a complete list of alarms data items which could appear in your alarms import .csv file.

Customizing the CSV Import File

In addition to editing the .csv file content, you can use an import definition file (.idf) to define details about how the items in your alarms .csv file are imported into FMS and how they will appear in the file. To do this, customize the column and data item settings (for example) using an .idf. See Using an Import Definition File for more information.

Back to top